<template>
  <div id="film">
    <HeadAndContent :list="list"></HeadAndContent>
    <Introduce :list="list" :stars="stars"></Introduce>
  </div>
</template>

<style scoped>
#film {
  margin-top: -50px;
  color: white;
  background-color: #1a2e40;
  padding: 0 15px;
}

img {
  width: 90px;
}

.i-active {
  display: block;
}

.i-no {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.introduce .i-text .i-t-top {
  display: flex;
  justify-content: space-between;
}

.i-actors ul {
  display: flex;
  overflow: auto;
}

.i-t-top,
.a-text,
.i-content {
  font-size: 10px;
}

.i-content {
  line-height: 20px;
}

.i-actors .a-text {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.i-actors ul li {
  margin-right: 10px;
  font-size: 10px;
  width: 90px;
}

.i-actors ul li .s-name {
  width: inherit;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  text-align: center;
  height: 20px;
  line-height: 20px;
}

.introduce .i-text .i-t-top {
  margin-top: 5px;
  margin-bottom: 10px;
}

.introduce .i-text .i-content {
  margin-bottom: 10px;
}

.pic > div {
  margin: 10px 0;
  font-size: 10px;
}

.pic video {
  border-radius: 10px;
}

.pic ul {
  display: flex;
  overflow: auto;
}

.pic ul li {
  margin-right: 10px;
}

.pic ul li img {
  height: 150px;
  width: auto;
}
</style>

<script>
import HeadAndContent from "../components/filmView/HeadAndContentComponent.vue";
import Introduce from "../components/filmView/IntroduceComponent.vue";
export default {
  data() {
    return {
      list: [],
      stars: [],
    };
  },
  components: {
    HeadAndContent,
    Introduce
  },
  props: {
    id: {
      type: String,
      default: "",
    },
  },
  created() {
    this.getM();
  },
  methods: {
    async getM() {
      await this.axios
        .get(`https://apis.netstart.cn/maoyan/movie/detail?movieId=${this.id}`)
        .then((re) => {
          console.log(re);
          this.list = re.data.movie;
          this.stars = re.data.celebrities;
        });
    },
  },
};
</script>

